package com.tidy.seed.admin.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
// 引入Jackson时间格式化注解（仅导入一次）
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author HZ-ZY
 * @since 2025-08-01
 */
@ApiModel(value = "User对象", description = "")
@Getter
@Setter
@TableName("sys_user")
public class User implements Serializable {
    @ApiModelProperty(value = "ID", notes = "字段名：id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名", notes = "字段名：username")
    private String username;

    @ApiModelProperty(value = "密码", notes = "字段名：password")
//    @JsonIgnore
    private String password;

    @ApiModelProperty(value = "昵称", notes = "字段名：nickname")
    private String nickname;

    @ApiModelProperty(value = "邮箱", notes = "字段名：email")
    private String email;

    @ApiModelProperty(value = "手机", notes = "字段名：phone")
    private String phone;

    @ApiModelProperty(value = "地址", notes = "字段名：address")
    private String address;

    @ApiModelProperty(value = "头像", notes = "字段名：avatar")
    private String avatar;

    @ApiModelProperty(value = "钱包余额", notes = "字段名：balance")
    private BigDecimal balance = BigDecimal.valueOf(0);

    @ApiModelProperty(value = "用户状态", notes = "字段名：status 0禁用 1启用")
    private Integer status = 1;

    @ApiModelProperty(value = "上级ID", notes = "字段名：superId")
    private Integer superId;

    @ApiModelProperty(value = "创建时间", notes = "字段名：createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createAt;

    @ApiModelProperty(value = "修改时间", notes = "字段名：updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateAt;

}